Errors are returned via the result. If no error occurs, the name of the file as it was sent or received is returned. Note that the name the file is sent as is usually not the Macintosh name (that's enclosed in the MacBinary header). The filename is stripped of all non-alphabetic characters and put into all caps.
The name the file is received as can be changed by the user (shortly after the transaction begins) and is returned in the result.